﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace TestStudent
{
    [TestClass()]
    public class StudentTest
    {
        [TestMethod()]
        [ExpectedException(typeof(ArgumentException))]
        public void EmptyNameTest()
        {
            string name = string.Empty;
            int fakNumber = 11111;
            Student targer = new Student(name, fakNumber);
        }

        [TestMethod()]
        [ExpectedException(typeof(ArgumentOutOfRangeException))]
        public void SmallerFacultyNumberTest()
        {
            string name = "asdfa";
            int fakNumber = 1111;
            Student targer = new Student(name, fakNumber);
        }

        [TestMethod()]
        [ExpectedException(typeof(ArgumentOutOfRangeException))]
        public void BiggerFacultyNumberTest()
        {
            string name = "asdfa";
            int fakNumber = 1111111;
            Student targer = new Student(name, fakNumber);
        }

        [TestMethod()]
        [ExpectedException(typeof(Exception))]
        public void DuplicateFacultyNumbersTest()
        {
            string name = "asdfa";
            int fakNumber = 11111;
            Student targer = new Student(name, fakNumber);
            Student secondTarget = new Student(name, fakNumber);
        }
    }
}
